
import * as THREE from 'three'
import { merge } from "lodash"

export class Camera {
  #defaultOptions = {
    a: 45,
    b: window.clientWidth / window.clientHeight,
    n: 1,
    f: 6000,
    px: 0,
    py: 300,
    pz: 300,
  }
  constructor(globe) {
    this.globe = globe;
    this.options = merge({}, this.#defaultOptions, globe.options.camera);
    
    return this.drawCamera()
  }

  drawCamera() {
    var camera = new THREE.PerspectiveCamera(this.options.a, this.options.b, this.options.n, this.options.f)
    camera.position.set(this.options.px, this.options.py, this.options.pz)
    // this.camera = camera;
    return camera
  }

  render() {
  }

}